<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateUserCouponsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('user_coupons', function(Blueprint $table)
		{
			$table->integer('id', true);
			$table->integer('conpon_id')->nullable();
			$table->integer('user_id')->nullable();
			$table->integer('staus')->nullable()->comment('0 未使用 1 已经使用 2 已过期');
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('user_coupons');
	}

}
